<?php

use Illuminate\Database\Seeder;
use App\Models\User;
class UsersTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $users=factory(\App\Models\User::class)->times(50)->make();
        User::insert($users->makeVisible(['password','remember_token'])->toArray());

        $user=User::find(1);
        $user->name='1';
        $user->email='1@qq.com';
        $user->password=bcrypt('123');
        $user->is_admin=true;
        $user->activated = true;
        $user->save();
        $user=User::find(2);
        $user->name='2';
        $user->email='2@qq.com';
        $user->password=bcrypt('123');
        $user->is_admin=false;
        $user->activated = true;
        $user->save();
    }
}
